.flappy_bird {
    position: relative;
    width: 320px;
    height: 568px;
    margin: auto;
    margin-top: 30px;
    background-color: #6fc6cd;

    .rank_btn {
        position: absolute;
        z-index: 1;
        top: 0;
        right: -60px;
        width: 57px;
        height: 83px;
        background: url("@images/flappyBird/rank-btn.png") no-repeat center
            center;
        background-size: 100% 100%;
        cursor: pointer;

        &:hover {
            background-image: url("@images/flappyBird/rank-btn-hover.png");
        }
    }

    .rank_wrap {
        position: absolute;
        z-index: 12;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;

        .rank_main {
            position: relative;
            width: 100%;
            height: 90%;
            overflow: hidden;

            .rank_ul {
                width: 100%;

                li {
                    width: 100%;
                    height: 60px;
                    display: flex;
                    align-items: center;
                    gap: 4px;
                    color: #fff;

                    .sort {
                        width: 40px;
                        text-align: center;
                    }

                    .user_msg {
                        display: flex;
                        align-items: center;
                        gap: 5px;

                        img {
                            width: 40px;
                            height: 40px;
                            border-radius: 50%;
                            overflow: hidden;
                        }

                        .user_name {
                            width: 50px;
                            overflow: hidden;
                            white-space: nowrap;
                            text-overflow: ellipsis;
                        }
                    }

                    .best_score {
                        width: 60px;
                        text-align: center;
                        color: orange;
                    }

                    .date {
                        font-size: 12px;
                    }
                }
            }
        }
    }

    .bird_main {
        position: relative;
        width: 100%;
        height: 100%;
        background-image: url("@images/flappyBird/bg.png");
        background-size: 100% 100%;
        overflow: hidden;

        @keyframes bird-common {
            0% {
                background-image: url("@images/flappyBird/bird0.png");
            }
            50% {
                background-image: url("@images/flappyBird/bird1.png");
            }
            100% {
                background-image: url("@images/flappyBird/bird0.png");
            }
        }
        @keyframes bird-up {
            0% {
                background-image: url("@images/flappyBird/up_bird0.png");
            }
            50% {
                background-image: url("@images/flappyBird/up_bird1.png");
            }
            100% {
                background-image: url("@images/flappyBird/up_bird0.png");
            }
        }
        @keyframes bird-down {
            0% {
                background-image: url("@images/flappyBird/down_bird0.png");
            }
            50% {
                background-image: url("@images/flappyBird/down_bird1.png");
            }
            100% {
                background-image: url("@images/flappyBird/down_bird0.png");
            }
        }

        .bird_wrap {
            position: absolute;
            z-index: 1;
            top: 188px;
            left: 0;
            width: 40px;
            height: 30px;

            .bird {
                width: 100%;
                background-size: 100% 100%;

                &.common {
                    height: 26px;
                    background: url("@images/flappyBird/bird0.png") no-repeat
                        center center;
                    animation: bird-common 0.3s linear infinite;
                }

                &.up {
                    height: 29px;
                    background: url("@images/flappyBird/up_bird0.png") no-repeat
                        center center;
                    animation: bird-up 0.3s linear infinite;
                }

                &.down {
                    height: 30px;
                    background: url("@images/flappyBird/down_bird0.png")
                        no-repeat center center;
                    animation: bird-down 0.3s linear infinite;
                }
            }
        }

        .play_page {
            position: relative;
            width: 100%;
            height: 100%;

            .score {
                position: absolute;
                z-index: 2;
                top: 5px;
                right: 10px;
                width: 100%;
                text-align: right;
                font-family: Alimama_ShuHeiTi_Bold;
                font-size: 20px;
            }

            .pipe_ul {
                position: relative;
                height: 100%;
            }
        }

        .begin_page {
            position: relative;
            width: 100%;

            @keyframes begin {
                0% {
                }
                25% {
                    top: 150px;
                }
                50% {
                    top: 180px;
                }
                75% {
                    top: 210px;
                }
                100% {
                    top: 180px;
                }
            }

            .begin_title {
                position: absolute;
                top: 180px;
                left: 0;
                width: 100%;
                display: flex;
                align-items: center;
                box-sizing: border-box;
                padding-left: 20px;
                animation: begin 2.5s linear infinite;

                &::after {
                    content: "*敲击空格键，控制小鸟上升，躲避管道~";
                    display: table;
                    position: absolute;
                    bottom: -22px;
                    left: 0;
                    width: 100%;
                    text-align: center;
                    color: #148892;
                }

                .begin_text {
                    width: 236px;
                    height: 77px;
                    background-image: url("@images/flappyBird/head.png");
                }

                .begin_icon {
                    width: 40px;
                    height: 26px;
                    background-image: url("@images/flappyBird/bird0.png");
                    animation: bird-common 0.3s linear infinite;
                }
            }

            .begin_btn {
                position: absolute;
                top: 345px;
                left: 50%;
                transform: translateX(-50%);
                width: 85px;
                height: 29px;
                cursor: pointer;
                background-image: url("@images/flappyBird/start.png");
            }
        }

        .end_page {
            position: absolute;
            z-index: 3;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #7ecdd2bd;
            box-sizing: border-box;
            padding-top: 100px;

            .game_over {
                width: 221px;
                height: 40px;
                background-image: url("@images/flappyBird/game_over.png");
                margin: auto;
            }

            .score_board {
                position: relative;
                width: 269px;
                height: 135px;
                margin: auto;
                margin-top: 45px;
                background-image: url("@images/flappyBird/message.png");

                .img {
                    position: absolute;
                    top: 52px;
                    left: 32px;
                    width: 50px;
                    height: 50px;
                    border-radius: 50%;
                    overflow: hidden;

                    img {
                        width: 100%;
                    }
                }

                .result,
                .best {
                    position: absolute;
                    right: 20px;
                    width: 60px;
                    height: 30px;
                    text-align: center;
                    line-height: 30px;
                    font-family: Alimama_ShuHeiTi_Bold;
                }

                .result {
                    top: 35px;
                }

                .best {
                    top: 83px;
                }
            }

            .ok_btn {
                width: 96px;
                height: 33px;
                margin: auto;
                margin-top: 45px;
                background-image: url("@images/flappyBird/ok.png");
                cursor: pointer;
            }
        }
    }
}
